test.js ➔ ???   A
last analyzed

Complexity

Conditions 1
Paths 0

Size

Total Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
cc 1
c 1
b 0
f 1
nc 0
dl 0
loc 3
rs 10
nop 1
1
'use strict';
2
3
// Do this as the first thing so that any code reading it knows the right env.
4
process.env.BABEL_ENV = 'test';
5
process.env.NODE_ENV = 'test';
6
process.env.PUBLIC_URL = '';
7
8
// Makes the script crash on unhandled rejections instead of silently
9
// ignoring them. In the future, promise rejections that are not handled will
10
// terminate the Node.js process with a non-zero exit code.
11
process.on('unhandledRejection', err => {
12
  throw err;
13
});
14
15
// Ensure environment variables are read.
16
require('../config/env');
17
18
const jest = require('jest');
19
const argv = process.argv.slice(2);
20
21
// Watch unless on CI or in coverage mode
22
if (!process.env.CI && argv.indexOf('--coverage') < 0) {
23
  argv.push('--watch');
24
}
25
26
27
jest.run(argv);
28